function insertLink(href, type, ref)
{
    var headID = document.getElementsByTagName("head")[0];         
    var cssNode = document.createElement('link');
    if(!type)
        cssNode.type = 'text/css';
    else
        cssNode.type = type;
    if(!ref)
        cssNode.rel = 'stylesheet';
    else
        cssNode.ref = ref;
    cssNode.href = href;
    cssNode.media = 'screen';
    headID.appendChild(cssNode);
}
function insertJS(href)
{
    var headID = document.getElementsByTagName("head")[0];         
    var newScript = document.createElement('script');
    newScript.type = 'text/javascript';
    newScript.src = href;
    headID.appendChild(newScript);
}

//including scripts
(function() {
    insertLink('resources/images/windows/Paste.gif', "image/jpg", "shortcut icon");
    insertLink("css/generic.css");
    insertLink("css/starrating.css");
    insertLink("css/menu.css");
    insertJS("jslib/prototype.js");
    insertJS("jslib/ef/scriptaculous.js");
    insertJS("jslib/jb.core.js");
    insertJS("jslib/jb.selector.2.js");
    insertJS("jslib/jb.ajax.js");
    insertJS("jslib/jb.designer.js");
    insertJS("htmlarea/htmlarea.js");
    insertJS("jslib/jb.inspector.js");
    insertJS("jslib/custom.js");
    insertJS("jslib/jb.calendar.js");
    insertJS("jslib/jb.menu.js");
})();
